home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 50
/
Volume 50 - JOGO DISK .iso
/
Games
/
marionettemadness.swf
/
scripts
/
__Packages
/
getURLManager.as
next >
Wrap
Text File
|
2007-10-01
|
1KB
|
58 lines
class getURLManager
{
function getURLManager(frequency)
{
this.callQueue = new Array();
this.processing = false();
if(frequency == undefined)
{
this.freq = 1000;
}
this.me = this;
}
function executeCall()
{
this.lastCall = getTimer();
var _loc2_ = this.callQueue.shift();
if(_loc2_.href.indexOf("javascript") != -1 || _loc2_.win == undefined || _loc2_.win == "" || _loc2_.win == null)
{
getURL(_loc2_.href,"");
}
else
{
getURL(_loc2_.href,_loc2_.win);
}
}
function stopCalling()
{
delete this.me.onEnterFrame;
this.processing = false;
}
function startCalling()
{
if(!this.processing)
{
this.lastCall = getTimer();
this.me.onEnterFrame = function()
{
if(getTimer() - this.lastCall > this.freq)
{
this.executeCall();
}
if(this.callQueue.length < 1)
{
this.me.stopCalling();
}
};
this.processing = true;
this.executeCall();
}
}
function addToQueue(inURL, inWindow)
{
var _loc2_ = {href:inURL,win:inWindow};
this.callQueue.push(_loc2_);
this.startCalling(this.callQueue);
}
}